import request from '@/utils/request'

// 查询工种列表
export function listJobs(query) {
  return request({
    url: '/prs/jobs/list',
    method: 'get',
    params: query
  })
}

// 查询班组列表
export function listTeam(query) {
  return request({
    url: '/prs/team/list',
    method: 'get',
    params: query
  })
}

//字典
export function dictMatching (data) {
  return request({
    url: '/system/dict/data/type/'+ data,
    method: 'get',
  })
}

// 查询工种详细
export function getJobs(roleId) {
  return request({
    url: '/prs/jobs/' + roleId,
    method: 'get'
  })
}

// 新增工种
export function addJobs(data) {
  return request({
    url: '/prs/jobs',
    method: 'post',
    data: data
  })
}

// 修改工种
export function updateJobs(data) {
  return request({
    url: '/prs/jobs',
    method: 'put',
    data: data
  })
}


// 删除工种
export function delJobs(roleId) {
  return request({
    url: '/prs/jobs/' + roleId,
    method: 'delete'
  })
}

// 导出工种
export function exportJobs(query) {
  return request({
    url: '/prs/jobs/export',
    method: 'get',
    params: query
  })
}